package com.zyb.core.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * 描述:
 *
 * @author z3412
 * @create 2019-08-14 21:20
 */
public class PageHelper{
    /**
     * 请求对象转换成
     * @param pageBase Page
     * @return
     */
    public static Page parsePage(PageBase pageBase){
        Page page = new Page();
        page.setSize(pageBase.getSize()==0?10:pageBase.getSize());
        page.setCurrent(pageBase.getCurrent()==0?1:pageBase.getCurrent());
        return page;
    }
}
